package com.micookie.v2ex.ui.adapter;


import android.app.Fragment;
import android.app.FragmentManager;

import java.util.List;

/**
 * Created by Administrator on 2016/10/27.
 */

public class FragPagerAdapter extends android.support.v13.app.FragmentPagerAdapter {

    List<Fragment> fragmentList;
    List<String> tabList;

    public FragPagerAdapter(FragmentManager fm, List<Fragment> fragmentList, List<String> tabList) {
        super(fm);
        this.fragmentList = fragmentList;
        this.tabList = tabList;
    }

    @Override
    public Fragment getItem(int position) {
        return fragmentList.get(position);
    }

    @Override
    public int getCount() {
        return fragmentList.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return tabList.get(position);
    }
}
